package com.nthink.indicators.service.qualitymanagement.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nthink.indicators.mapper.qualitymanagement.DrugManagementMapper;
import com.nthink.indicators.pojo.qualitymanagement.DrugManagement;
import com.nthink.indicators.service.qualitymanagement.DrugManagementService;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class DrugManagementServiceImpl extends ServiceImpl<DrugManagementMapper, DrugManagement> implements DrugManagementService {

    @Override
    public DrugManagement getDrugManagement(Date startTime, Date endTime) {
        DrugManagement DrugManagement = new DrugManagement();
        DrugManagement.setOutAntibacterialsPercent(baseMapper.getOutAntibacterialsPercent(startTime, endTime));
        DrugManagement.setOutInjectionPercent(baseMapper.getOutInjectionPercent(startTime, endTime));
        DrugManagement.setDrugFeePercent(baseMapper.getDrugFeePercent(startTime, endTime));
        DrugManagement.setAntibacterialsDrugFeePercent(baseMapper.getAntibacterialsDrugFeePercent(startTime, endTime));
        return DrugManagement;
    }
}
